using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zhang.BLL.UCenter.Label
{
    /// <summary>
    /// 标签
    /// </summary>
    public class Label
    {
        private static readonly IDAL.UCenter.ILabel Dal = Zhang.IDALFactory.UCenterAccess<IDAL.UCenter.ILabel>.CreateDal("Label");

        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="model">数据内容</param>
        /// <returns></returns>
        public int Insert(Zhang.Model.UCenter.Label model)
        {
            return Dal.Insert(model);
        }

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model">数据内容</param>
        /// <returns></returns>
        public bool Update(Zhang.Model.UCenter.Label model)
        {
            return Dal.Update(model);
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id">主键</param>
        /// <returns>影响行数 </returns>
        public int Delete(int id)
        {
            return Dal.Delete(id);
        }

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="arrPk"></param>
        /// <returns>影响行数 </returns>
        public int DeleteMuch(string[] arrPk)
        {
            return Dal.DeleteMuch(arrPk);
        }

        /// <summary>
        /// 根据ID查询单个实体
        /// </summary>
        /// <param name="id">Id</param>
        /// <returns></returns>
        public Zhang.Model.UCenter.Label Select(int id)
        {
            return Dal.Select(id);
        }

        /// <summary>
        /// 查询列表
        /// </summary>
        /// <param name="sch">查询参数</param>
        /// <param name="seq">排序字段</param>
        /// <returns></returns>
        public List<Zhang.Model.UCenter.Label> SelectList(Zhang.Model.UCenter.LabelSch sch = null, Zhang.Model.Sequence seq = null)
        {
            return Dal.SelectList(sch, seq);
        }

        /// <summary>
        /// 列表 - 分页查询
        /// </summary>
        /// <param name="pageIndex">页数</param>
        /// <param name="pageSize">每页条数</param>
        /// <param name="logSch">日志查询参数</param>
        /// <param name="seq">排序</param>
        /// <returns></returns>
        public (List<Zhang.Model.UCenter.Label>, int) SelectList(int pageIndex, int pageSize,
            Zhang.Model.UCenter.LabelSch logSch, Zhang.Model.Sequence seq = null)
        {
            return Dal.SelectList(pageIndex, pageSize, logSch, seq);
        }

    }
}
